1. Field of the Invention
The present invention relates generally to a packet transfer apparatus for transmitting and/or receiving event sequence data such as audio data and music data over a fast serial network to which a plurality of devices are connected.
2. Description of Related Art
A technology of transmitting audio data such as voice and tone and MIDI data over an IEEE 1394 serial network configured by sequentially coupling a plurality of electronic musical instruments and audio equipment units with cables is known as “Audio and Music Data Transmission Protocol, Version 1.0, 1997-5, 1394 Trade Association.”
Referring to FIG. 10, there is shown a diagram illustrating flows of packets over a network. This network has three transmitting nodes 101, 102, and 103 and one receiving node 104. In this example, audio data inputted from peripheral devices at these transmitting nodes 101, 102 and 103 are reproduced by a peripheral device at this receiving node 104. The transmitting nodes 101, 102, and 103 each send a packet or packets. The receiving node 104 receives these packets and reproduces, at a predetermined sampling rate, the audio data contained in the packet received from desired one of the transmitting nodes. References 105a through 105d denote packets supplied from the transmitting A node 101, 106a through 106c denote packets supplied from the transmitting B node 102, and 107 denotes a packet supplied from the transmitting C node 103.
The timing of the entire network is controlled by a cycle master node (not shown). The cycle master node sends cycle start packets in every 125 microseconds to the other nodes. Every time the nodes receive a cycle start packet, each node is synchronized with the cycle master node by setting the cycle timer in each node by the absolute time information contained in the cycle start packet.
Each of the transmitting nodes 101, 102, and 103 generates a timestamp (abbreviated as “syt”), one in every 8 sampling clocks (or 8 data blocks), on the basis of the time provided by the cycle timer, for the audio data reproduced at a predetermined sampling clock by a peripheral device connected to that transmitting node. Each transmitting node also arranges audio data of one or more channels into a data field and arranges the associated timestamp into a syt field so as to form a packet composed of the data field and the syt field, and sends the packet. The timestamp specifies the reproduction time at the receiving side of an event sequence (or an audio channel). DBC (Data Block Count) indicates the total number of data blocks sent so far. Each of the data blocks is generally made up of data of two or more event sequences generated at the same sampling time.
Referring to FIG. 11, there is shown a diagram illustrating a packet format for use at isochronous transmission. Isochronous transmission denotes a mode of data transmission defined in the link layer of IEEE 1394. In this transmission mode, a transmission delay is compensated and each node is allocated with a communication band in advance. The packet format is made up of an isochronous header, a CIP (Common Isochronous Packet format) header, and a data field having basically a width of 32 bits. The isochronous header includes sub-fields of data length, tag, channel (isochronous transmission channel), “1000” bit train (tcode) indicative of isochronous data packet, synchronization (sync), and header CRC (Cyclic Redundancy Check).
The CIP header contains various items necessary for a receipt operation, such fields as DBS (Data Block Size). DBC (Data Block Count), and syt. The syt field of a packet having no timestamp is written with “no data” value. The data field contains audio data and MIDI data. Available for the data format of the data field are (1) AM824 generic format, (2) AM824 IEC958 conformant, (3) AM824 Raw audio, (4) AM824 MIDI conformant, (5) 32-bit Data format, and (6) 24*4 Audio pack format.
Referring to FIG. 12, there is shown an operational diagram illustrating isochronous transmission. Particularly, this diagram shows a transmission control operation. In the example shown in FIG. 10, a timestamp is attached to every 8 data blocks (at every 8 sampling clocks). In the example of FIG. 12, a timestamp is attached to every 4 data blocks (at every 4 sampling clock) and sampling frequency Fs is 26.7 KHz. The upper half part shows the transmit side, in which an event sequence (sampling data) is created. The lower half part shows the receive side, in which the event sequence (sampling data) is reproduced. In the middle part, packets are shown. In this example, sampling data reproduced with a predetermined sampling clock are generated as an event sequence in the transmitting node. The cycle timer of the transmitting node outputs a time value. The transmitting node generates an allocated band of data blocks once every nominal isochronous cycle (125 microseconds), attaches a timestamp in taking account of a transmission delay to each packet, and sends the resultant packets.
A first packet contains DBC=3 (namely, 3 data blocks have already been transmitted) and syt=R1, along with 3 data blocks. A second packet contains DBC=6 (namely, 6 data blocks have already been transmitted) and syt=R2 in predetermined fields, along with 4 data blocks. Likewise, third through fifth packets are transmitted. However, the fourth packet has no timestamp because this packet does not contain a data block of a sampling clock corresponding to the timestamp interval.
Each packet is received with a certain transfer delay by the receiving node. Then, the receiving node generates a reproduction sampling clock. Referring to FIG. 12, an item “INDEX” denotes a value indicative of a particular data block included in the packet and corresponding to the time of timestamp interval. This value (0, 1, 2 or 3) is obtained by performing computation on the DBC value and the timestamp interval.
Referring back to FIG. 10, value DBC=3 is added to the packet 105a to be transmitted by the transmitting A node 101. DBC=7 and syt=1000 are added to the packet 105b. The data block having the same time as the time of syt=1000 is DA0. DBC=16 and syt=9000 are added to the packet 105d. The data block having the same time as the time of syt=9000 is DA8. Data block DA8 is located 8 data blocks after DA0. On the other hand, values DBC=7 and syt=7000 are added to the packet 106a to be transmitted from the transmitting B node 102. DBC=12 is added to the packet 106b. Values DBC=16 and syt=F000 are added to the packet 106c. 
One to three cables of IEEE 1394 are connected in each node to a physical layer IC (Integrated Circuit) of the physical layer. The physical layer IC is connected to a link layer controller IC that provides the link layer. The link layer controller IC is connected to an LSI (Large Scale Integration, hereafter referred to as a packet handler) for transmission of IEEE 1394 digital audio/MIDI. The packet handler executes the above-mentioned Audio and Music Data Transmission Protocol. In the transmission of event sequence data such as realtime audio and music data in the packet format of isochronous transmission mode, the time in which packets arrive at the receiving node and the interval of reception of these packets are not constant, because this mode is not synchronous. Therefore, it becomes necessary to regulate the reproduction of the received packets to the time specified by the transmit side and to output the reproduced audio data to a peripheral sound device in synchronization with the input sampling clock of the transmit side.